package pojo;

import java.time.LocalDateTime;

public class Playlist {
    private int playlistId;       // 播放列表 ID
    private int userId;           // 用户 ID，关联到 Users 表
    private int songId;           // 歌曲 ID
    private String playlistName;  // 播放列表名称
    private LocalDateTime createTime;      // 创建时间

    // 无参构造函数
    public Playlist() {
    }

    // 有参构造函数
    public Playlist(int userId, int songId, String playlistName, LocalDateTime createTime) {
        this.userId = userId;
        this.songId = songId;
        this.playlistName = playlistName;
        this.createTime = createTime;
    }

    // Getter 和 Setter 方法
    public int getPlaylistId() {
        return playlistId;
    }

    public void setPlaylistId(int playlistId) {
        this.playlistId = playlistId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getSongId() {
        return songId;
    }

    public void setSongId(int songId) {
        this.songId = songId;
    }

    public String getPlaylistName() {
        return playlistName;
    }

    public void setPlaylistName(String playlistName) {
        this.playlistName = playlistName;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Playlist{" +
                "playlistId=" + playlistId +
                ", userId=" + userId +
                ", songId=" + songId +
                ", playlistName='" + playlistName + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
